Avoiding name collision for the ACPI control methods

ABSTRACT

Embodiments of the invention provide systems and methods for avoiding name collision for the advanced configuration and power interface (ACPI) control methods. Accordingly, a method embodiment of the present invention comprises, obtaining a ACPI control method reserved name, obtaining a unique first argument, and associating the first argument with the reserved name to form a unique identifier for said specific control method, such that name collisions are avoided by preventing use of a same identifier for different specific control methods.

FIELD OF INVENTION

The present invention generally relates to computer systems and morespecifically to systems and methods for avoiding name collision for theACPI control methods.

BACKGROUND ART

The Advanced Configuration and Power Interface (ACPI) specification isthe primary mechanism for providing system configuration information formany of the newer computer systems. ACPI is neither a softwarespecification nor a hardware specification. ACPI is instead an interfacespecification. ACPI defines the primary runtime interfaces between theoperating system (OS) software and the system firmware/hardware on mostof the modem computers, especially ×86 and Itanium processors. The ACPIspecification was developed to establish common industry interfaces,enabling robust operating system directed/controlled device and systemconfiguration and power management. Additionally, ACPI is the keyelement in Operating System directed configuration and Power Management(OSPM). OSPM is a model of power and system management in which the OSplays a central role and uses global information to optimize systembehavior at any given time.

ACPI promotes the concepts of power management and energy conservationby transitioning unused devices into lower power states. ACPI alsoprovides the means for an orderly transition from the legacy system(where most hardware system management is done by the ROM BIOS) to themore modern ACPI based systems, while allowing both systems to coexist.

For the reasons stated above, ACPI based computer systems are becomingincreasingly popular and system developers and original equipmentmanufacturers (OEMs) are in a race to include ever increasing valueadded features in their products using the ACPI standards.

When designing ACPI based devices and systems, developers must followthe ACPI standards and tools. The ACPI tool kit includes the use ofhardware registers implemented on the motherboard, Basic Input OutputSoftware (BIOS) interfaces such as system configuration tables, deviceenumeration and configuration tools, and executable function interfacesalso referred to as control methods.

ACPI control methods are the ACPI objects that system firmware presentsto the OS to invoke and evaluate the system and devices status, atruntime. In other words, a control method is a definition of how the OScan perform a certain hardware task, such reading a temperature of athermal zone on a motherboard. In ACPI, by convention, a control methodname is limited to only four characters. Conventionally, there have onlybeen two categories of names for a control method. The first category isthe reserved names. These names are referred to as reserved namesbecause their usage is reserved by the ACPI specification. Sincereserved names are actually owned by the ACPI Special Interest Group(SIG), permission for their use must be obtained from the SIG group. Thereserved name convention dictates that each reserved name starts withthe underscore character “_” followed by three characters each of whichcould be a capital letter (for a total of 26 characters), or a numberfrom 0–9.

The other category of names for a control method is the non-reservednames. As with the reserved names, the non-reserved names can only havefour characters, each of which may be one of 26 letters, A–Z, or 10numbers, 0–9. The total number of permutations of the non-reserved namesis thus thirty-six to the power of 4 (36⁴).

There are many problems associated with the current ACPI namingconvention. In the case of reserved names, ACPI SIG has to registerthese names as referring to a designated control method. But ACPI SIG isnot always in session and, thus, consideration of new reserved names canonly happen whenever the SIG committee meets to update the ACPIspecification. Additionally, in most cases the request for a reservedname must disclose the reasons for its need. This disclosure may violatetrade secrets and raise other confidentiality issues.

Another problem with obtaining reserved names from SIG is related to thefact that SIG's focus is toward the baseline features of the standard.As a result, the SIG's responsibility does not typically extend to thevalue added features many developers may be pursuing.

Yet another issue with ACPI reserved name convention is that because itis limited to three characters, there is a limited number of names thatare available for use as a reserved name. This problem is aggravated bythe fact that, in most cases, there is a desire to select reserved namesthat have some meaningful relation to the function of the control methodto which they are referring. Thus the real combination of meaningfulreserved names is really less than the limited number of possiblepermutations the characters allow.

Non-reserved names carry many of the same problems. The validnon-reserved names are limited to a combination of four characters.However, the number of practical permutations is significantly less whenone considers the constraints of trying to create acronyms that have ameaningful relationship to a designated control method.

Additionally, due to the nature of the interface evolution as, it isimpossible that any one person or organization would have visibilityinto all the control methods being created.

Furthermore, although the non-reserved names do not need the SIGcommittee's approval, since there is typically no establishedcommunication among the entities that create these new control methods,there exists a real possibility of name collision under the current ACPIinfrastructure.

Name collision refers to the occurrence where different entities use thesame name for control methods that perform different functions.

In ACPI, a definition block contains information about hardwareimplementation and configuration details, including data and controlmethods. A device manufacturer can provide one or more definition blocksin the ACPI tables. In each system, all the definition blocks along withtheir contents (including the control method names) are placed in ahierarchical tree structure, referred to as an ACPI namespace.

As part of a definition block, a control method may be used tocharacterize various properties and functionalities of a device. If adevice manufacturer designed a device that provides vendor specificvalue-add features but is otherwise compatible with a generic type ofdevice, ACPI uses _HID object to identify the value-add aspect, whilealso uses _CID object to identify the compatibility with the generictype. Both _HID and _CID objects live in the same scope used to describethis device in the ACPI name space. All control methods for this deviceare also in this scope The problem of control method name collision iseven more apparent in this case.

The control methods associated with the _HID object are designed anddefined by the device manufacturer, while the control methods associatedwith the _CID object are defined for the generic device type, usually bya standards group. The two definition bodies may happen to choose a namefor completely different functions. This name collision is even morelikely since, in selecting a control method name, most designers choosenames that are meaningful acronyms for the control method. Because allthe control methods are listed under the same scope in the ACPI namespace for a particular system, name collision becomes a real andincreasingly likely possibility.

As previously discussed, currently, there are two approaches to addressthe name collision problem. The first approach is to use a reserved nameto refer to a control method. However, obtaining permission to use areserved name to exclusively refer to a designated control methodrequires the authorization of the ACPI SIG committee. As mentionedbefore, the committee is not always in session, the numbers of reservednames are limited and the request for a reserved name may require thedivulgence of trade secrets.

The second approach in using non reserved names is problematic, becauseit involves using the name and relying on chance that no name collisionoccurs.

Therefore, alternative mechanisms are needed to refer to control methodsused under the ACPI specification that avoid the problem of namecollision.

SUMMARY OF THE INVENTION

Embodiments of the invention provide systems and methods for avoidingname collision for the advanced configuration and power interface (ACPI)control methods. Accordingly, a method embodiment of the presentinvention comprises obtaining a ACPI control method reserved name,obtaining a unique first argument, and associating the first argumentwith the reserved name to form a unique identifier for said specificcontrol method, such that name collisions are avoided by preventing useof a same identifier for different specific control methods.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and form a part ofthis application, illustrate embodiments of the present invention, andtogether with the description, serve to explain the principles of theinvention. Unless noted, the drawings referred to this descriptionshould be understood as not being drawn to scale.

FIG. 1 shows a table of the argument formats according to one embodimentof the present invention.

FIG. 2 shows a flowchart of a method of creating a unique control methodname according to an embodiment of the present invention.

FIG. 3 shows a block diagram of a system of generating a unique ACPIcontrol method name according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

This invention provides a solution for avoiding name collision ofcontrol method names under the ACPI specification. In one embodiment,the solution generally involves creating a unique identifier andassociating the unique identifier with an ACPI reserved name withreference to calling a control method.

Under the ACPI specification, the control method calling convention canbe best described as call-by-reference-constant. This means that objectsare passed to each other as arguments by reference and not by copying.Under a call-by-reference-constant convention, internal objects can beshared across each method invocation. Because a call-by-referenceconvention allows for a reduced number of objects to be copied, thisconvention is particulary suited for the low-level nature of the ACPIsubsystem within the kernel of a host operating system.

Additionally, under the ACPI convention, the ability of a called methodto modify the aguments passed to it is extremly limited. Therefore, ineffect, the arguments that are passed to a control method are passed asa constant that cannot be modified except under specific controlledcircumstances.

Under ACPI, up to seven arguments may be passed to a control method.Each argument may in turn include a package on its own, referring toother objects and control methods. It should be noted, that as usedherein this document, a package refers to a set of objects. An objectrefers to a node of the ACPI namespace inserted in the tree structure bythe OS, using the information provided to it in system definition tablesas defined by ACPI.

FIG. 1 shows a table 100 of the argument formats according to oneembodiment of the present invention. As shown in table 100 of FIG. 1,the first Argument is referred to as Arg0. In one embodiment of thepresent invention, the value of Arg0 represents a unique identifier. Inone embodiment, this identifier may be a Universal Unique Identifier(UUID). In one embodiment, Arg0 is 16 bytes long or 128 bits. As shownin Table 100 of FIG. 1, the second argument (Arg1) may be a 32 bitsvalue representing a control method revision identification (ID). Thisrevision ID may be used to indicate the version of the particularcontrol method designated.

In one embodiment, the third argument or Arg2 acts as a 32 bits functionbit mask. Thus, in one implementation of the present invention, a bitmay be set in this argument, representing a given function associatedwith the unique identifier presented in Arg0. In an alternativeembodiment, the value of Arg2 designates a particular functionassociated with the unique identifier value of Arg0.

The fourth argument or Arg3 may represent the number of parameter valuesthat will be passed to the designated control method in the sixthargument (Arg5).

The fifth argument or Arg4 may represent the number of parameter valuesthat will be returned by the designated control method when called.

Finally, according to an embodiment of the present invention, all theparameter values needed by the designated control method to perform itsprocessing are passed to in the sixth argument or (Arg5). As previouslymentioned, the count of parameter values that will be passed to thecontrol method in Arg5 is declared in Arg3, and the count of theparameter values that will be returned by the control method is declaredin Arg4.

In one embodiment of the present invention, the seventh argument (Arg6)is not used.

With the above overview in mind, the present invention provides asolution for the ACPI control method name collision problem previouslydiscussed. By using the argument structure presented herein above, auniversally unique identifier used in conjunction with an ACPI reservedname may serve as a unique name or reference for a particular controlmethod, avoiding the problem of name collision.

FIG. 2 shows a flowchart of a method of creating a unique control methodname according to an embodiment of the present invention. In oneembodiment, the method of FIG. 2 is implemented on a computer readablemedium. As shown in FIG. 2, in step 202, a unique identifier is createdfor providing a unique name of a control method. In one embodiment, thisunique identifier may be a Universal Unique Identifier (UUID) that isgenerated automatically using an algorithm or generator that guaranteesthe uniqueness of the identifier. UUID stands for a Universal UniqueIDentifier. There are 128 bit numbers assigned to each identifier. Themechanism used to guarantee that UUIDs are unique is based on thecombinations of hardware addresses, time stamps, and random seeds.

There is a reference in the UUID to the hardware address of the firstnetwork card on the host that generated the UUID. This reference isintended to ensure the UUID will be unique in space as the Media AccessControl (MAC) address of every network card is assigned by a singleglobal authority and is guaranteed to be unique. A MAC address is ahardware address that uniquely identifies each node of a network. Thenext component of the UUID is a timestamp, which always moves clocksforward, and will be unique in time. Lastly, there is a random componentplaced into the UUID as a catch-all for uniqueness. An example of a UUIDis “58f202ac-22cf-11d1-b12d-002035b29092.”

It should be apparent to one skilled in the art that alternative meansof generating a unique identifier to be used in referring to adesignated control method (object) may be used in conjunction with thepresent invention. However, for the unique identifier to be global, theonly limitation is that the unique identifier generated be guaranteed tobe unique and for it to be available to everyone. In the case of theUUID generator, it is guaranteed to generate unique identifiers untilthe year 3400. Additionally, since each UUID is 128 bits long, thelikelihood of a name collision by having all 128 bits to be the same islow even after the year 3400.

As shown in FIG. 2, in operation 204, the unique identifier isassociated with an ACPI reserved name to provide a unique control method(object) name under ACPI specification. In one embodiment, the reservedname is _DSM (Device Specific Method). _DSM is a generic, ACPI reservedname, approved by the ACPI SIG committee. Because _DSM is an ACPIreserved name, the name may not be used for purposes other than thoseapproved by the ACPI SIG committee.

The association of the reserved name with the UUID is made during systemoperation by calling the reserved name and passing to it the uniqueidentifier as an argument. In one embodiment, the unique identifier ispassed to the designated control method as the value of a firstargument, also referred to as argument zero (Arg0).

The combination of the unique identifier and the reserved name yields aglobally unique identifier that may then used to refer to and call acontrol method directed to a particular function. The possibility ofname collision is avoided because each unique identifier is guaranteedto be unique, and thus the combination of the generic reserved name(_DSM) and the unique identifier is unique.

In one embodiment, in operation 206, a second identifier may beassociated with the first unique identifier and passed along as thesecond argument or Arg1. This second identifier may identify theparticular version of a given control method. Thus, the value of Arg2may be a number identifying the designated version of the controlmethod, uniquely identified by the combination of the reserved name, thevalue of the first argument, and the value of the second argument.

Additionally, in an alternative embodiment, in operation 208, a thirdidentifier may be passed along as the third argument (Arg2) identifyinga particular function referred to under the global unique identifiergenerated in operation 202. In one embodiment, the third argument is 32bits long and each bit may be used to refer to a single functionassociated with the unique global identifier. This allows theidentification of up to 32 unique functions associated with a singleunique identifier. Alternatively, a number value may be used to refer tothe designated function. This feature allows for the definition ofadditional functions, all of which may be associated with a singleglobally unique identifier such as the UUID.

As previously mentioned, under the ACPI specification, an object mayreceive up to seven arguments. Thus, in one embodiment of the presentinvention, the fourth argument, Arg3 may be used to pass a valuerepresenting the number of parameters or arguments to be passed to thedesignated function, in the sixth argument, Arg5. Additionally, thevalue passed in the fifth argument, Arg4 may be used to identify thenumber of return values or parameters to be received from the designatedcontrol method. Finally, in one embodiment, the sixth argument or Arg5may be used to pass the actual parameters needed by the designatedcontrol method.

Thus, the teachings of the various embodiments of the present inventionallows system and device manufacturers and designers to use a reservedname (_DSM in one embodiment) in association with a unique globalidentifier as a first argument, a unique version number in a secondargument, and a unique function identifier in third argument, to createand uniquely reference a designated control method (object) according tothe ACPI specification, while avoiding the risk of name collision.

The teachings of the present invention further allow the evolution of alocally defined interface or control method to a regionally and orglobally defined interface, without requiring any additional changes.

With the growing popularity of the ACPI specification, an increasingnumber of system and device manufacturers are using the ACPI basedcontrol methods to add value-added features to their designs. In mostcases, the intial phase of the development involves a single designer ora group of designers within a company. By using a universal uniqueidentifier such as the UUID, the local design team may insure theselection of a unique name for the ACPI control method that is used toimplement the desired value-added features. A universally uniqueidentifier insures that no two independent development groups can comeup with the same name to refer to different control methods, performingdifferent functions.

Since the identifier used to reference the locally selected controlmethod name is universally unique, it may easily be adopted regionallyand/or globally by other entities, without the risk of causing namecollision. This means that a small development group within an unknowncompany may come up with a control method and an associated name thatmay be adopted by other groups within the company or even othercompanies and entities, and the universally unique control method nameassures that any use of the unique name would only reference thedesignated control method developed locally.

FIG. 3 shows a block diagram of a system of generating a unique ACPIcontrol method name according to an embodiment of the present invention.

FIG. 3 shows a system 300 comprising a unique identifier generator 302,a combiner 304, an argument packager 306, and an argument receiver 308.In one embodiment of the present invention, the unique identifiergenerator 302 is used to create a unique identifier for referencing adesignated control method. In one embodiment, the generated identifiermay be a universally unique identifier guaranteed to be universallyunique. An example of a universally unique identifier is the UUID. Theoutput of the unique identifier generator 302 is coupled to a combiner304. In one embodiment, the combiner 304 combines an ACPI reserved namewith the unique identifier generated by the unique identifier generator302 to form an ACPI based unique name or reference for a designatedcontrol method.

In alternative embodiments of the present invention, in addition to thegenerated unique identifier, additional identifiers such a versionnumber of the designated control method and a function identifierassociated with the particular generated unique identifier may also becombined to form the unique name or reference for a designated controlmethod.

In one embodiment, the output of the combiner is coupled to an argumentpackager 306 that combines the various identifiers that may comprise theuniversally unique ACPI name of the designated control method witharguments needed for processing by the control method. In oneembodiment, the output of the argument packager 306 is coupled to theargument receiver 308. In an alternative embodiment, the function of theargument packager 306 is integrated into the argument receiver 308.

The argument receiver 308 receives a packaged group of arguments fromcombiner 304 directly or in an alternative embodiment, through theargument packager 306. The received package may include arguments thatprovide the parameter values necessary for the designated control methodto perform its designed function. Additionally, the package of argumentsreceived by the argument receiver 308 include arguments that are used toidentify the designated ACPI control method. In one embodiment, theargument receiver 308 processes the universally unique name it receivedfrom the combiner 304 or the argument packager 306 by calling thedesignated control method. Upon calling the control method, it performsthe desired function and provides the desired output to the operatingsystem.

Additionally, the arguments received by the argument receiver 308 mayinclude a version identifier, identifying the particular version of thecontrol method associated with the universally unique identifier. In oneembodiment, a single universally unique identifier may be associatedwith several versions of a control method.

Similarly, an argument received by the argument receiver 308 mayidentify a particular function associated with the universal uniqueidentifier. In one embodiment, the function identifier acts as afunction bit mask, and each bit that is set may identify a differentfunction associated with a single universally unique identifier. In oneembodiment, up to 32 functions can be identified in this way. In analternative embodiment, the value of the function identifier argumentidentifies a particular function.

In another embodiment, a function identifier logic 310 may be used toidentify the designated function based on the value of the functionidentifier argument received.

Thus, the use of a universally unique identifier and name as a referencefor a locally developed control method allows for the adoption of thesame name on a regional or global scale, by using the unique name. Theuse of the locally developed unique ACPI control method name on local,regional and global scale avoids any name collision problems.

The foregoing descriptions of specific embodiments of the presentinvention have been presented for purposes of illustration anddescription. They are not intended to be exhaustive or to limit theinvention to the precise forms disclosed, and many modifications andvariations are possible in light of the above teaching. The embodimentswere chosen and described in order to best explain the principles of theinvention and its practical application, to thereby enable othersskilled in the art to best utilize the invention and various embodimentswith various modifications as are suited to the particular usecontemplated. It is intended that the scope of the invention be definedby the Claims appended hereto and their equivalents.

1. A method of avoiding name collision for the advanced configurationand power interface (ACPI) control methods comprising: obtaining a firstargument, wherein said first argument is unique; associating said firstargument with an a ACPI control method reserved name to comprise aunique identifier for a specific control method, such that namecollisions are avoided by preventing use of a same identifier fordifferent specific control methods and calling said specific controlmethod using said unique identifier.
 2. The method of claim 1 whereinsaid first argument is associated with said reserved name by beingpresented as an argument value when calling said control method usingsaid reserve name.
 3. The method of claim 1 wherein said first argumentis automatically generated.
 4. The method of claim 1 wherein said firstargument is 128 bits long.
 5. The method of claim 1 wherein said firstargument is locally, regionally and globally unique.
 6. The method ofclaim 1 further comprising: associating a second argument with saidfirst argument, wherein said second argument identifies a version ofsaid specific control method.
 7. The method of claim 6 wherein saidsecond argument is 32 bits long.
 8. The method of claim 6 furthercomprising: associating a third argument with said first argument,wherein said third argument identifies a function associated with saidfirst unique argument.
 9. The method of claim 8 wherein said thirdargument has a maximum of 32 functions associated with it.
 10. Themethod of claim 8 further comprising: associating a fourth argument withsaid first argument, wherein said fourth argument identifies the numberof arguments to be passed to said specific control method identified bysaid first, second and third arguments.
 11. The method of claim 8further comprising: associating a fifth argument with said firstargument, wherein said fifth argument identifies the number of argumentsto be returned by said specific control method identified by said first,second and third arguments.
 12. The method of claim 8 furthercomprising: associating a sixth argument with said first argument,wherein said sixth argument includes all the arguments to be passed tosaid specific control method identified by said first, second and thirdarguments.
 13. The method of claim 1 wherein the unique identifier is auniversal unique identifier (UUID).
 14. A computer program embodied on acomputer readable medium for avoiding name collision for the advancedconfiguration and power interface (ACPI) control methods, the computerprogram causing a computer to perform the steps of: obtaining a firstargument, wherein said first argument is unique to a specific controlmethod; associating said first argument with a generic reserved ACPIcontrol method name to comprise a unique identifier for said specificcontrol method used by an operating system in invoking said specificcontrol method; and using said unique identifier to invoke said specificcontrol method.
 15. The computer program of claim 14 wherein said uniqueidentifier is associated with said reserved name by being presented asan argument value of said control method when called using said reservename.
 16. The computer program of claim 14 wherein said method furthercomprises: associating a second argument with said first argument,wherein said second argument identifies a version of said specificcontrol method.
 17. The computer program of claim 16 wherein said methodfurther comprises: associating a third argument with said firstargument, wherein said third argument identifies a function associatedwith said first argument.
 18. The computer program of claim 17 whereinsaid method further comprises: associating a fourth argument with saidfirst argument, wherein said fourth argument identifies the number ofarguments to be passed to said specific control method identified bysaid first, second and third arguments.
 19. The computer program ofclaim 17 wherein said method further comprises: associating a fifthargument with said first argument, wherein said fourth argumentidentifies the number of arguments to be returned by said specificcontrol method identified by said first, second and third arguments. 20.A system for avoiding name collision for advanced configuration andpower interface (ACPI) control, said system comprising: a uniqueidentifier generator operative to generate a universally uniqueidentifier; a combiner coupled to said unique identifier generator, saidcombiner operative to combine said unique identifier with a reservedACPI control method name to form a unique reference to a designatedcontrol method; and an argument receiver coupled to said combiner, saidargument receiver operative to process said unique reference to identifyand call said designated control method.
 21. The system of claim 20further comprising: an argument packager having an input coupled to anoutput of said combiner and an output coupled to said argument receiver,said argument packager operative to package arguments for processing bysaid designated control method.
 22. The system of claim 20 wherein saidunique reference further comprises: a control method version numberassociated with said universally unique identifier; and a control methodfunction identifier, identifying a designated function associated withsaid universally unique identifier.